package com.zhang.activity;
import com.zhang.little_sample.R;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
/**
 * Created by admin on 2015/10/23.
 */

public class CustomProgressDialog extends ProgressDialog {
    private Context mContent;

    public CustomProgressDialog(Context context) {
        super(context, R.style.theme_customer_progress_dialog);
        mContent = context;
    }

    public CustomProgressDialog(Context context, int theme) {
        super(context, theme);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        this.setIndeterminateDrawable(mContent.getResources().getDrawable(
//                R.anim.progress_round));
//        this.setCanceledOnTouchOutside(false);
    }

    public CustomProgressDialog show(Context context, String message) {
        CustomProgressDialog dialog = new CustomProgressDialog(context);
        dialog.setMessage(message);
        dialog.show();
        return dialog;
    }

    public void cancel() {
        // TODO Auto-generated method stub
        super.cancel();
    }
    @Override
    public void dismiss() {
        // TODO Auto-generated method stub
        super.dismiss();
    }
}